# 参考网址：
# https://docs.python.org/3.13/whatsnew/3.13.html
# https://github.com/vyos/vyos-1x/blob/current/src/op_mode/show_users.py


def get_spnam(username):
    with open('/etc/shadow') as f:
        for u in f.readlines():
            i = u.split(":")
            if username == i[0]:
                return i[1]
    return None

encrypted_password = get_spnam(user_name)
